package FileIOStream;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.lang.reflect.Field;

/**
 * @Author liangzai
 * @Description:
 */
public class Demo3 {
    public static void main(String[] args) throws IOException {
        File file = new File("./test.txt");
        file.createNewFile();
        try(FileInputStream inputStream = new FileInputStream(file)){
            while(true){
                int n = inputStream.read();
                if(n == -1){
                    break;
                }
                System.out.println(n);
            }
        }catch (IOException e){
            throw new IOException(e);
        }
    }
}
